export default [
  {
    path: '/login',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/login', name: 'login', component: './User/Login' },
      { path: '/login/third/:userCode', name: 'link', component: './User/ThirdLogin' },
      { path: '/login/ahdxLogin', name: 'link', component: './User/AhdxLogin' },
      { path: '/login/ahydtempLogin', name: 'link', component: './User/AhydTempLogin' },
      {
        component: '404',
      },
    ],
  },

  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    routes: [
      { path: '/', redirect: '/homepage' },
      {
        path: '/homepage',
        name: 'index',
        icon: 'home',
        component: './Index',
      },

      // 管理员登录界面
      // 管理员登录界面
      // 系统管理
      {
        path: '/system',
        authority: ['sysadminrole', 'secadminrole', 'auditorrole'],
        icon: 'setting',
        name: 'system',
        routes: [
          {
            path: '/system/org',
            name: 'org',
            component: './System/OrgList',
          },
          {
            path: '/system/user',
            name: 'user',
            component: './System/UserList',
          },
          {
            path: '/system/role',
            name: 'role',
            component: './System/RoleList',
          },
          {
            path: '/system/menu',
            name: 'menu',
            component: './System/MenuList',
          },
          {
            path: '/system/dictionary',
            name: 'dictionary',
            component: './System/Dictionary',
            routes: [
              {
                path: '/system/dictionary',
                redirect: '/system/dictionary/dicType',
              },
              {
                path: '/system/dictionary/dictype',
                name: 'dictype',
                component: './System/DicType',
              },
              {
                path: '/system/dictionary/dicName',
                name: 'dicName',
                component: './System/DicName',
              },
            ],
          },
          {
            path: '/system/weakpassword',
            name: 'weakpassword',
            component: './System/WeakPsw',
          },
          {
            path: '/system/security',
            name: 'security',
            component: './System/Security',
            routes: [
              {
                path: '/system/security',
                redirect: '/system/security/pswPolicy',
              },
              {
                path: '/system/security/pswPolicy',
                name: 'pswPolicy',
                component: './System/PswPolicy',
              },
              {
                path: '/system/security/loginPolicy',
                name: 'loginPolicy',
                component: './System/LoginPolicy',
              },
            ],
          },
          {
            path: '/system/msg',
            name: 'msg',
            component: './System/Msg',
            routes: [
              {
                path: '/system/msg',
                redirect: '/system/msg/mailboxC',
              },
              {
                path: '/system/msg/mailboxC',
                name: 'mailboxC',
                component: './System/MailboxC',
              },
              {
                path: '/system/msg/mailTem',
                name: 'mailTem',
                component: './System/MailTem',
              },
              {
                path: '/system/msg/messageTem',
                name: 'messageTem',
                component: './System/MessageTem',
              },
            ],
          },
        ],
      },


      //扫描配置
      {
        path: '/sensitiveData',
        // authority: ['sysadminrole', 'secadminrole', 'auditorrole'],
        icon: 'build',
        name: 'sensitiveData',
        routes: [
          {
            path: '/sensitiveData/database',
            name: 'database',
            component: './SensitiveData/Database',
          },
          {
            path: '/sensitiveData/keyword',
            name: 'keyword',
            component: './SensitiveData/Keyword',
          },
          {
            path: '/sensitiveData/dataType',
            name: 'dataType',
            component: './SensitiveData/DataType',
          },
          {
            path: '/sensitiveData/dataLevel',
            name: 'dataLevel',
            component: './SensitiveData/DataLevel',
          },
          {
            path: '/sensitiveData/databaseGroup',
            name: 'databaseGroup',
            component: './SensitiveData/DatabaseGroup',
          },{
            path: '/sensitiveData/tags',
            name: 'tags',
            component: './SensitiveData/Tags',
          },

        ],
      },

      //数据加解密
      {
        path: '/security',
        // authority: ['sysadminrole', 'secadminrole', 'auditorrole'],
        icon: 'lock',
        name: 'security',
        routes: [
          {
            path: '/security/pwdRule',
            name: 'pwdRule',
            component: './Security/PwdRule',
          },
          {
            path: '/security/bnsSystem',
            name: 'bnsSystem',
            component: './Security/BnsSystem',
          },
          {
            path: '/security/keyMngt',
            name: 'keyMngt',
            component: './Security/KeyMngt',
          },
          {
            path: '/security/scene',
            name: 'scene',
            component: './Security/Scene',
          },
        ],
      },

       //任务计划
       {
        path: '/taskInfo',
        // authority: ['sysadminrole', 'secadminrole', 'auditorrole'],
        icon: 'build',
        name: 'taskInfo',
        routes: [
          {
            path: '/taskInfo/taskMngt',
            name: 'taskMngt',
            component: './SensitiveData/TaskMngt',
          },
          {
            path: '/taskInfo/taskHistory',
            name: 'taskHistory',
            component: './SensitiveData/TaskHistory',
          },
          {
            path: '/taskInfo/taskHistory/report',
            name: 'report',
            component: './SensitiveData/Report',
          },
        ],
      },

       //报表展示
       {
        path: '/scanInfo',
        // authority: ['sysadminrole', 'secadminrole', 'auditorrole'],
        icon: 'build',
        name: 'scanInfo',
        routes: [
          {
            path: '/scanInfo/scanResult',
            name: 'scanResult',
            component: './SensitiveData/ScanResult',
            routes: [
              {
                path: '/scanInfo/scanResult',
                redirect: '/scanInfo/scanResult/table',
              },
              {
                path: '/scanInfo/scanResult/table',
                name: 'table',
                component: './SensitiveData/ScanTable',
              },
              {
                path: '/scanInfo/scanResult/column',
                name: 'column',
                component: './SensitiveData/ScanColumn',
              },
            ],
          },
          // {
          //   path: '/scanInfo/infoShow',
          //   name: 'infoShow',
          //   component: './SensitiveData/InfoShow',
          // },
          {

            path: '/scanInfo/infoShow',
            name: 'infoShow',
            component: './SensitiveData/InfoShow',
          },
          {
            path: '/scanInfo/scanResultStatistics',
            name: 'scanResultStatistics',
            component: './SensitiveData/ScanResultStatistics',
          },
          {
            path: '/scanInfo/moreStatistics',
            name: 'moreStatistics',
            hideInMenu: true,
            component: './SensitiveData/MoreStatistics',
          },

        ],
      },

      //审计日志
      {
        path: '/auditLog',
        authority: ['sysadminrole', 'secadminrole', 'auditorrole'],
        icon: 'read',
        name: 'auditLog',
        routes: [
          {
            path: '/auditLog/userLog',
            name: 'userLog',
            component: './AuditLog/UserLog',
          },
          {
            path: '/auditLog/adminLog',
            name: 'adminLog',
            component: './AuditLog/AdminLog',
          },

        ],
      },

      {
        name: 'exception',
        icon: 'warning',
        hideInMenu: true,
        path: '/exception',
        routes: [
          // exception
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './Exception/404',
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './Exception/500',
          },
          {
            path: '/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './Exception/TriggerException',
          },
        ],
      },

      {
        component: '404',
      },
    ],
  },
];
